I went ahead and expanded on the Find File in Directory snippet by Tuzoid at http://www.dreamincode.net/code/snippet684.htm This object lets you search for one or more files in one or more directories using regular expressions with the option to search sub directories and ignore case.

Regular expressions can be used for both name and extension matching, which means you can type in both file names and file extensions as regular expression strings.

$search = new file_search($files [, $directories [, $sub [, $case]]])

$files may be string or array
$directories may be string or array
$sub may be bool or int (false/0 = no searching subdirectories)
$case may be bool or int (false/0 = case insensitive)

Examples:
# extensions are always insensitive
# trailing slash for directories is optional

$find = array('Terms.[^php]', 'contact.php|html');

// searches current directory and sub directories, case insensitive
$search = new file_search($find);

// searches /test/subdir and sub directories, case sensitive
$search = new file_search($find, 'test/subdir', 1, 0);

// searches /images and /test for image with extension jpg, gif, or bmp
// sub directories, case insensitive
$search = new file_search('image.jpg|gif|bmp', array('images', 'test'));

// searches current directory for files with the letters a-h
// no sub directories, case insensitive
$search = new file_search('[a-h].php', '.', 0);


Result:
$search->found // array of results with directory path

======================================================

<?php
class file_search
{
  var $found = array();

  function file_search($files, $dirs = '.', $sub = 1, $case = 0)
  {
    $dirs = (!is_array($dirs)) ? array($dirs) : $dirs;
    foreach ($dirs as $dir)
    {
      $dir .= (!ereg('/$', $dir)) ? '/' : '';
      $directory = @opendir($dir);

      while (($file = @readdir($directory)) !== FALSE)
      {
        if ($file != '.' && $file != '..')
        {
          if ($sub && is_dir($dir . $file))
          {
            $this->file_search($files, $dir . $file, $sub, $case);
          }
          else
          {
            $files = (!is_array($files)) ? array($files) : $files;
            foreach ($files as $target)
            {
              $tar_ext = substr(strrchr($target, '.'), 1);
              $tar_name = substr($target, 0, strrpos($target, '.'));
              $fil_ext = substr(strrchr($file, '.'), 1);
              $fil_name = substr($file, 0, strrpos($file, '.'));

              $ereg = ($case) ? 'ereg' : 'eregi';
              if ($ereg($tar_name, $fil_name) && eregi($tar_ext, $fil_ext))
              {
                $this->found[] = $dir . $file;
              }
            }
          }
        }
      }
    }
  }
}

$find = array('test.[^php]', 'contact.php|html');
$search = new file_search($find);

echo '<pre>';
print_r($search->found);
echo '</pre>';
?>